-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
fix #57749, model ccall binding access in inference #58872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
So we basically need a custom interpreter here to handle the non-standard IR in ccall names, which I have tried to do but am flailing a bit 😄 It doesn't really need to be "correct" and its value is not used. It just needs to be enough for inference to tell which bindings are accessed. So far I only have special support for nests of calls, which handles many cases like |
One inline comment and I think we need to pkgeval this to see if there's any corner cases, but I think as a workaround, this seems reasonable. |
1c6a89d
to
d4e80a0
Compare
d4e80a0
to
3e868b2
Compare
@nanosoldier |
@KristofferC already pkgeval'd this in #58987 |
This PR wasn't linked nor the tag removed. In any case that run was not too useful since there were assertion failures from the other PR. |
The package evaluation job you requested has completed - possible new issues were detected. Report summary❗ Packages that crashed3 packages crashed only on the current version.
3 packages crashed on the previous version too. ✖ Packages that failed42 packages failed only on the current version.
1156 packages failed on the previous version too. ✔ Packages that passed tests15 packages passed tests only on the current version.
5369 packages passed tests on the previous version too. ~ Packages that at least loaded16 packages successfully loaded only on the current version.
3224 packages successfully loaded on the previous version too. ➖ Packages that were skipped altogether2 packages were skipped only on the current version.
903 packages were skipped on the previous version too. |
Looks like up to 15 failures caused by this PR (CustomGaussQuadrature was in the last report as failing from this PR too)
|
argtypes[i] = ai[].rt | ||
i += 1 | ||
end | ||
res = abstract_call(interp, ArgInfo(e.args, argtypes), sstate, sv) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, this call will occasionally corrupt the InferenceState structure for the current statement, since this is not actually the current statement (there might be some support code in return_type_tfunc for working around it though)
I've played around with ccall semantics a bunch (#57931) but concluded that a bandaid like this is far better for 1.12.
fixes #57749